package org.example.aop;

import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

@Component
@Aspect  //设置当前类为AOP切面类
public class MyAdvice {

    //切入点表达式
    //切入点表达式
//    @Pointcut("execution(void org.org.example.dao.BookDao.update())")
//    @Pointcut("execution(void org.*.*.*.update())")
    @Pointcut("execution(void org.*.*.*.*())")
    @Pointcut("execution(void org.org.example.dao.BookDao.update())")
    private void pt(){}
    @Before("pt()")
    public void method(){
        System.out.println(System.currentTimeMillis());
    }

}
